Skip to content

[fix][clickhouse-init] correct SQL syntax and enable multiquery in bootstrap scripts#409

Closed
night-ci wants to merge 1 commit into
coze-dev:mainfrom
night-ci:fix/clickhouse-init-sql-syntax
Closed

[fix][clickhouse-init] correct SQL syntax and enable multiquery in bootstrap scripts#409
night-ci wants to merge 1 commit into
coze-dev:mainfrom
night-ci:fix/clickhouse-init-sql-syntax

Conversation

@night-ci
Copy link
Copy Markdown
Contributor

This PR fixes two issues in the ClickHouse bootstrap initialization.

First, the evaluation.sql file was missing a comma after the evaluator_weighted_score column definition, which caused a syntax error during table creation when skip indexes were present.

Second, the clickhouse-client command in entrypoint.sh did not use the --multiquery flag, which is required to execute multiple SQL statements such as CREATE TABLE followed by ALTER TABLE in a single .sql file. Both changes are necessary for successful database initialization in Docker environments. The fix has been verified locally with ClickHouse version 23.8.

- Add missing comma after `evaluator_weighted_score` column in
  `evaluation.sql` to fix ClickHouse table creation syntax error
- Enable `--multiquery` flag in `clickhouse-client` invocation to support
  multiple SQL statements (including CREATE TABLE with skip indexes) in
  a single .sql file

These changes ensure the initialization script runs successfully when
bootstrap SQL files contain compound statements or skip index definitions.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jan 27, 2026

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@night-ci night-ci marked this pull request as draft January 29, 2026 01:51
@night-ci night-ci marked this pull request as ready for review January 29, 2026 01:51
@night-ci night-ci marked this pull request as draft January 29, 2026 01:51
@night-ci night-ci marked this pull request as ready for review January 29, 2026 01:51
@night-ci night-ci closed this Jan 29, 2026
@night-ci night-ci reopened this Jan 29, 2026
@night-ci night-ci closed this Jan 29, 2026
@night-ci night-ci deleted the fix/clickhouse-init-sql-syntax branch January 29, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants